// Verilated -*- C++ -*-
// DESCRIPTION: Verilator output: Design implementation internals
// See VRISCV_BOARD.h for the primary calling header

#include "verilated.h"
#include "verilated_dpi.h"

#include "VRISCV_BOARD__Syms.h"
#include "VRISCV_BOARD___024unit.h"

extern "C" void halt(svBit is_halt);

VL_INLINE_OPT void VRISCV_BOARD___024unit____Vdpiimwrap_halt_TOP____024unit(CData/*0:0*/ is_halt) {
    VL_DEBUG_IF(VL_DBG_MSGF("+        VRISCV_BOARD___024unit____Vdpiimwrap_halt_TOP____024unit\n"); );
    // Body
    svBit is_halt__Vcvt;
    for (size_t is_halt__Vidx = 0; is_halt__Vidx < 1; ++is_halt__Vidx) is_halt__Vcvt = is_halt;
    halt(is_halt__Vcvt);
}

extern "C" int inst_read(int raddr);

VL_INLINE_OPT void VRISCV_BOARD___024unit____Vdpiimwrap_inst_read_TOP____024unit(IData/*31:0*/ raddr, IData/*31:0*/ &inst_read__Vfuncrtn) {
    VL_DEBUG_IF(VL_DBG_MSGF("+        VRISCV_BOARD___024unit____Vdpiimwrap_inst_read_TOP____024unit\n"); );
    // Body
    int raddr__Vcvt;
    for (size_t raddr__Vidx = 0; raddr__Vidx < 1; ++raddr__Vidx) raddr__Vcvt = raddr;
    int inst_read__Vfuncrtn__Vcvt;
    inst_read__Vfuncrtn__Vcvt = inst_read(raddr__Vcvt);
    inst_read__Vfuncrtn = inst_read__Vfuncrtn__Vcvt;
}

extern "C" void inst_write(int waddr, int wdata);

VL_INLINE_OPT void VRISCV_BOARD___024unit____Vdpiimwrap_inst_write_TOP____024unit(IData/*31:0*/ waddr, IData/*31:0*/ wdata) {
    VL_DEBUG_IF(VL_DBG_MSGF("+        VRISCV_BOARD___024unit____Vdpiimwrap_inst_write_TOP____024unit\n"); );
    // Body
    int waddr__Vcvt;
    for (size_t waddr__Vidx = 0; waddr__Vidx < 1; ++waddr__Vidx) waddr__Vcvt = waddr;
    int wdata__Vcvt;
    for (size_t wdata__Vidx = 0; wdata__Vidx < 1; ++wdata__Vidx) wdata__Vcvt = wdata;
    inst_write(waddr__Vcvt, wdata__Vcvt);
}

extern "C" int data_read(int raddr);

VL_INLINE_OPT void VRISCV_BOARD___024unit____Vdpiimwrap_data_read_TOP____024unit(IData/*31:0*/ raddr, IData/*31:0*/ &data_read__Vfuncrtn) {
    VL_DEBUG_IF(VL_DBG_MSGF("+        VRISCV_BOARD___024unit____Vdpiimwrap_data_read_TOP____024unit\n"); );
    // Body
    int raddr__Vcvt;
    for (size_t raddr__Vidx = 0; raddr__Vidx < 1; ++raddr__Vidx) raddr__Vcvt = raddr;
    int data_read__Vfuncrtn__Vcvt;
    data_read__Vfuncrtn__Vcvt = data_read(raddr__Vcvt);
    data_read__Vfuncrtn = data_read__Vfuncrtn__Vcvt;
}

extern "C" void data_write(int waddr, int wdata, char wmask);

VL_INLINE_OPT void VRISCV_BOARD___024unit____Vdpiimwrap_data_write_TOP____024unit(IData/*31:0*/ waddr, IData/*31:0*/ wdata, CData/*7:0*/ wmask) {
    VL_DEBUG_IF(VL_DBG_MSGF("+        VRISCV_BOARD___024unit____Vdpiimwrap_data_write_TOP____024unit\n"); );
    // Body
    int waddr__Vcvt;
    for (size_t waddr__Vidx = 0; waddr__Vidx < 1; ++waddr__Vidx) waddr__Vcvt = waddr;
    int wdata__Vcvt;
    for (size_t wdata__Vidx = 0; wdata__Vidx < 1; ++wdata__Vidx) wdata__Vcvt = wdata;
    char wmask__Vcvt;
    for (size_t wmask__Vidx = 0; wmask__Vidx < 1; ++wmask__Vidx) wmask__Vcvt = wmask;
    data_write(waddr__Vcvt, wdata__Vcvt, wmask__Vcvt);
}

extern "C" void get_cpu_pc(int pc, int dnpc);

VL_INLINE_OPT void VRISCV_BOARD___024unit____Vdpiimwrap_get_cpu_pc_TOP____024unit(IData/*31:0*/ pc, IData/*31:0*/ dnpc) {
    VL_DEBUG_IF(VL_DBG_MSGF("+        VRISCV_BOARD___024unit____Vdpiimwrap_get_cpu_pc_TOP____024unit\n"); );
    // Body
    int pc__Vcvt;
    for (size_t pc__Vidx = 0; pc__Vidx < 1; ++pc__Vidx) pc__Vcvt = pc;
    int dnpc__Vcvt;
    for (size_t dnpc__Vidx = 0; dnpc__Vidx < 1; ++dnpc__Vidx) dnpc__Vcvt = dnpc;
    get_cpu_pc(pc__Vcvt, dnpc__Vcvt);
}

extern "C" void get_cpu_inst(int inst);

VL_INLINE_OPT void VRISCV_BOARD___024unit____Vdpiimwrap_get_cpu_inst_TOP____024unit(IData/*31:0*/ inst) {
    VL_DEBUG_IF(VL_DBG_MSGF("+        VRISCV_BOARD___024unit____Vdpiimwrap_get_cpu_inst_TOP____024unit\n"); );
    // Body
    int inst__Vcvt;
    for (size_t inst__Vidx = 0; inst__Vidx < 1; ++inst__Vidx) inst__Vcvt = inst;
    get_cpu_inst(inst__Vcvt);
}
